﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Common;
using Yugi.Client.WebSerive;

namespace Yugi.Client.ViewModel
{
    public class ExternalModel
    {
        public int UserID { get; set; }
        public List<RoomInfo> roominfo_s { get; set; }
        public IInvoke Presenter { get; set; }
        public void ReceiveMessageFromSupervisor(MSG_GSM Message, params object[] param)
        {
        }
        public RoomInfo GetRoomInfo(int roomid)
        {
            foreach (var i in roominfo_s)
                if (i.RoomID == roomid)
                    return i;
            return null;
        }
        public void AddRoomInfo(RoomInfo roominfo)
        {
            roominfo_s.Add(roominfo);
        }
        public void RemoveRoomInfo(int roomID)
        {
            foreach (var i in roominfo_s)
                if (i.RoomID == roomID)
                {
                    roominfo_s.Remove(i);
                    return;
                }
        }

    }
}
